package com.qiu.config;


import com.alipay.api.request.AlipayTradePagePayRequest;

import com.qiu.util.general.PropertiesUtil;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * 
 */
@Data
@Component
public class AlipayConfig {
    /**
     * 沙箱appId
     */
    public static final String APPID = "2021000119672902";

    /**
     * 请求网关  固定
     */
    public static final String URL = "https://openapi.alipaydev.com/gateway.do";

    /**
     * 编码
     */
    public static final String CHARSET = "UTF-8";

    /**
     * 返回格式
     */
    public static final String FORMAT = "json";

    /**
     * RSA2
     */
    public static final String SIGNTYPE = "RSA2";

    /**
     * 异步通知地址
     */
    public static final String NOTIFY_URL = "http://" + PropertiesUtil.getDomain() + "/alipay/notify";

    /**
     * 同步地址
     */
    public static final String RETURN_URL = "http://" + PropertiesUtil.getDomain() + "/alipay" +
          "/success";

    /**
     * 应用私钥 pkcs8格式
     */
    public static final String RSA_PRIVATE_KEY =
          "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDyEnT2U6YeB1930mvesEfkF0LtJW8eOfjXsJaQIxmAU9HtH674h7wPtE8mQfJ3d5bMZ+MJHmbUXGNW8jvobh6rRv6OPjc0XoVYfl/xPRh0nPIgNmftM6h7oe1zNbVkmyrYb1dPRD4oixJNihUnqAYoZTjtVir39YhH509YZWlUcW8Elnv8tU3LzZxP7FwKE/Cn2lAUBvgi6Xy9ew8na4qthmvDRRdgYnJ3iU3D1xgNIkXIkLn5QeK3fY9/QXmg5SQBa1PRjnSQ8+qilPzTQCOatImJbQWTJ23Y4gwNp5tuyKb1veeV/IBp1Uk593Sbj7EwoSytPpsVQVr86NxStjdbAgMBAAECggEBAIUSZl+/TjN1xCJ/dzMc3vhhXTY2fOY14jjX53zm/q7P5TggUbRoEZbkfRo/6IWKJUjK10D9CHQ3MZjrYsl8N7naNjeFth1A1Lb4Cc/40QfR+zyADBOWcUk9k+XgoY3jyuLeGjYGAtGQ2gfsH4MEWBY+xtOZqddTj45Pdw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    public static final String ALIPAY_PUBLIC_KEY =
          "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtX/2aHNXuW38VgwnXYFjwtlPbWNpjbjRaKt9yQqKzgYqYJBcwRTDHax3uZfKP0ItUMyF264KDbkGK4QSVB2h+PyjwLRZuAj7ApXLsXWv3Qupt3qu3Jhh+8VX+NI42kbgDMA7O91iZFElG5F/P5kcDawsXs6mCqx67rMyYZDKu9Tq2+EjzFaX5/JO95uEvOudnVyDbWV+YX8aQTZQFxsTvkncdnPscqzhz6dLwYxqcGMjt3J++Jypjg4POnfkTuG9wrFq/995FhWkE1VG2SObxZlZpirJOIf5aegdMCxJIZU33u5tMsarE2x/Dz4zzkr84Oe3u40pGbNK259OWk7elQIDAQAB";

    private AlipayConfig() {
    }


    //多列模式的 aliPayRequest
    @Bean
    public AlipayTradePagePayRequest alipayTradePagePayRequest(){
        AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();
        return alipayRequest;
    }
}
